﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<VietImage.Models.Category>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Phóng sự ảnh
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%
    int lang = 2;    
 %>
    <div>

        <div id="direction" style="width:400px; float:left; padding-top:15px;">
            <div class="right-arrow"></div>
            <div style="font-size:14px; float:left;"><%=Html.ActionLink("THƯ VIỆN ẢNH", "Index", "Category") %></div>
            <div class="right-arrow"></div>
            <div style="font-size:14px; float:left;"><%=Html.ActionLink("PHÓNG SỰ ẢNH", "ReportageBrowse", "Category")%></div>
        </div>
        <div id="searchTool" style="width:600px; float:right;">
            <table border="0" cellspacing="5" cellpadding="5" style="float:right;">
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0" border="0">
	                        <tr class="tr-textbox">    
    	                        <td class="left-textbox"></td>
                                <td class="center-textbox"><input value="Từ khóa ..." size="40" onfocus="textboxsearchonfocus(this);" onblur="textboxsearchonblur(this);" name="txtSearch" type="text" class="search-textbox"/></td>
    	                        <td class="right-textbox"></td>    
                            </tr>
                        </table>
                    </td>
                    <td>
                        <div style="cursor:pointer;" onmouseout="buttonmouseout('Search');" onmousedown="buttonmousedown('Search');" onmouseover="buttonmouseover('Search');"><table cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td id="lbtnSearch" class="left-button"></td>
                                <td id="mbtnSearch" class="middle-button"><span style="color:White;">TÌM KIẾM</span></td>
                                <td id="rbtnSearch" class="right-button"></td>                        
                            </tr>          
                        </table></div>                    
                    </td>
                    <td class="horizontalborder-twoline"></td>
                    <td style="font-size:14px"><div style="cursor:pointer"><i><%= Html.ActionLink("Tìm kiếm nâng cao", "Index", "Search") %></i></div></td>
                </tr>
            </table>
        
        </div>
    </div>

     <div id="listCategories" style="clear:both; width:1000px; position:relative; left:50%; margin-left:-500px; padding-top:5px;">
            
            <div class="scrollbar2" style="width:1000px;">

                <div class="scrollbar" style="margin-right:150px;"><div class="track"><div class="thumb"><div class="end"></div></div></div></div>
<% 
    VietImage.Models.Category cat = new VietImage.Models.Category();
    int count = 0;
    if (Model.Children != null)
    {
        count = Model.Children.Count;
    }
    Double h = ((Double)count / 2) + 0.5;
    int itemwidth = 500;
    int half = (int)h;
%>
                <div class="viewport" style="width:1000px; height:600px; margin-top:50px;"><div class="overview" style="<%= "width:" + half * itemwidth + "px;" %>">

<% 
    
    
    for (int i = 0; i < count; )
    {
        cat = Model.Children[i++];
%>
                    <div style="float:left;">

                        <div style="margin: 0 30px 30px 0; width:470px; height: 250px;" class="dotpanel">
                            <table style="width: 100%; height: 100%;">
                            <tr>
                                <td width="40%" align="center" style="margin: auto;">
                                    <div onclick="movetopage('<%= Url.Action("ReportageDetail", "Category", new { id = cat.ID }, null) %>');" style=" cursor:pointer; width:200px; height:250px; margin-left:5px; margin-right:25px; margin-top:5px; margin-bottom:5px; clear:both;">
                                        <div style="float:left;"><img height="200" width="200" src="/Image/Category/<%= cat.ID %>" alt="" /></div>
                                        <div style="height:30px; width:200px; margin-top:5px; clear:both; float:left;">
                                            <div style="float:left"><img src="/Image/Category/<%= cat.ID %>" alt="" width="200" height="30" /></div>
                                            <div class="fogbutton" style="float:left; margin-left:-200px; vertical-align:bottom; width:200px;"><div style="padding-top:7px;"><%= cat.GetDetail(lang).Name %></div></div>
                                        </div>
                            
                                    </div>
                                </td>
                                <td align="left" valign="top">
                                    <div style="margin-top:5px; margin-bottom:5px; margin-right:5px;">
                                        <span >Thành phố:</span> <%= cat.City.Name %> <br />
                                        <span >Quốc gia:</span> <%= cat.City.Country.Name %> <br />
                                        <span >Nội dung:</span> <%= cat.GetDetail(lang).Description%><br />
                                        <span >Ngày chụp:</span> <%= cat.CreatedTime.ToString("dd/MM/yyyy") %><br />
                                        <span >Tác giả:</span> <%= cat.Author %><br />
                                        <span >Credit:</span> <br />
                                    </div>
                                </td>
                            </tr>       
                            </table>
                        </div>
<%
        if (i < Model.Children.Count)
        {
            cat = Model.Children[i++];
%>
                        <div style="margin: 0 30px 30px 0; width:470px; height: 250px;" class="dotpanel">
                            <table style="width: 100%; height: 100%;">
                            <tr>
                                <td width="40%" align="center" style="margin: auto;">
                                    <div onclick="movetopage('<%= Url.Action("ReportageDetail", "Category", new { id = cat.ID }, null) %>');" style=" cursor:pointer; width:200px; height:250px; margin-left:5px; margin-right:25px; margin-top:5px; margin-bottom:5px; clear:both;">
                                        <div style="float:left;"><img height="200" width="200" src="/Image/Category/<%= cat.ID %>" alt="" /></div>
                                        <div style="height:30px; width:200px; margin-top:5px; clear:both; float:left;">
                                            <div style="float:left"><img src="/Image/Category/<%= cat.ID %>" alt="" width="200" height="30" /></div>
                                            <div class="fogbutton" style="float:left; margin-left:-200px; vertical-align:bottom; width:200px;"><div style="padding-top:7px;"><%= cat.GetDetail(lang).Name%></div></div>
                                        </div>
                            
                                    </div>
                                </td>
                                <td align="left" valign="top">
                                    <div style="margin-top:5px; margin-bottom:5px; margin-right:5px;">
                                        <span >Thành phố:</span> <%= cat.City.Name %> <br />
                                        <span >Quốc gia:</span> <%= cat.City.Country.Name %> <br />
                                        <span >Nội dung:</span> <%= cat.GetDetail(lang).Description %><br />
                                        <span >Ngày chụp:</span> <%= cat.CreatedTime.ToString("dd/MM/yyyy") %><br />
                                        <span >Tác giả:</span> <%= cat.Author%><br />
                                        <span >Credit:</span> <br />
                                    </div>
                                </td>
                            </tr>       
                            </table>
                        </div>
<%
        } 
%>
                    </div>
<%
    }
%>

                </div></div>

            </div>
    </div>


</asp:Content>
